// @/api/index.js

import request from './request.js'

module.exports = { // 导出
	// 详情请求 带参数的
	// 用户登录
	SubmitLogin: async (params) => {
		return await request({
			url: '/Base_Manage/Home/SubmitLogin',
			data: params,
			method: 'post'
		})
	},

	//获取用户信息
	GetOperatorInfo: async (params) => {
		return await request({
			url: '/Base_Manage/Home/GetOperatorInfo',
			data: params,
			method: 'post'
		})
	},

	// 获取业务性质下拉列表数据
	BaseDictionaryllainGetTreeParentDataList: async (params) => {
		return await request({
			url: '/Base_BasicData/Base_DictionaryMain/GetTreeParentDataList',
			data: params,
			method: 'post'
		})
	},
	// 获取审批流程管理列表
	Ai_TemplateGetDataList: async (params) => {
		return await request({
			url: '/FlowManagement/Ai_Template/GetDataList',
			data: params,
			method: 'post'
		})
	},
	// 获取地区树结构    二级
	Base_DistrictGetTreeDataTList: async (params) => {
		return await request({
			url: '/Base_BasicData/Base_District/GetTreeDataTList',
			data: params,
			method: 'post'
		})
	},
	// 获取地区树结构    三级
	Base_DistrictGetTreeDataList: async (params) => {
		return await request({
			url: '/Base_BasicData/Base_District/GetTreeDataList',
			data: params,
			method: 'post'
		})
	},


	//获取公司列表数据
	CompanyDataList: async (params) => {
		return await request({
			url: '/Base_Manage/Base_Department/GetDepartmentTreeDataList',
			data: params,
			method: 'post'
		})
	},
	// 获取部门下拉列表
	DepartmentList: async (params) => {
		return await request({
			url: '/Base_Manage/Base_Department/GetDepartmentList?DeptId=' + params.DeptId,
			data: {},
			method: 'post'
		})
	},
	// 获取客户下拉列表
	GetDataListForCustomerInfoRetrieval: async (params) => {
		return await request({
			// 暂时不删除  先用 关联客户选择的搜索客户的接口  后续根据需求调整该接口即可
			// 原来接口
			// url: '/CustomerManagement/CustomerInfo/GetDataList',
			// 最新修改接口
			url: '/CustomerManagement/CustomerInfo/GetDataListForCustomerInfoRetrieval',
			data: params,
			method: 'post'
		})
	},
	// 日常和差旅附件刪除
	Reimburse_FilesDeleteData: async (params) => {
		return await request({
			url: '/ReimburseManagement/Reimburse_Files/DeleteData',
			data: params,
			method: 'post'
		})
	},
	// 获取票据类型  费用类型 发票分类  下拉列表数据
	GetTheDataByDicKey: async (params) => {
		return await request({
			url: '/Base_BasicData/Base_DictionaryMain/GetTheDataByDicKey',
			data: params,
			method: 'post'
		})
	},
	// 差旅报销单 行程子表删除
	Reimburse_Travel_Business_ItemDeleteData: async (params) => {
		return await request({
			url: '/ReimburseManagement/Reimburse_Travel_Business_Item/DeleteData',
			data: params,
			method: 'post'
		})
	},
	// 差旅报销单 行程子表下的费用明细子表删除
	Reimburse_Travel_Business_SubsidyDeleteData: async (params) => {
		return await request({
			url: '/ReimburseManagement/Reimburse_Travel_Business_Subsidy/DeleteData',
			data: params,
			method: 'post'
		})
	},

	// 获取我发起的列表
	Ai_WorkitemGetToDoDataList: async (params) => {
		return await request({
			url: '/FlowManagement/Ai_Workitem/GetToDoDataList',
			data: params,
			method: 'post'
		})
	},
	// 获取我发起的列表
	Ai_WorkitemGetMyInitiatedDataList: async (params) => {
		return await request({
			url: '/FlowManagement/Ai_Workitem/GetMyInitiatedDataList',
			data: params,
			method: 'post'
		})
	},
	// 我经办的
	Ai_WorkitemGetMyHandlingDataList: async (params) => {
		return await request({
			url: '/FlowManagement/Ai_Workitem/GetMyHandlingDataList',
			data: params,
			method: 'post'
		})
	},

	// 日常子表刪除
	Reimburse_Daily_ItemDeleteData: async (params) => {
		return await request({
			url: '/ReimburseManagement/Reimburse_Daily_Item/DeleteData',
			data: params,
			method: 'post'
		})
	},
	// 差旅报销和补贴子表删除
	// Reimburse_Travel_Business_ItemDeleteData: async (params) => {
	// 	return await request({
	// 		url: params.url,
	// 		data: params.params,
	// 		method: 'post'
	// 	})
	// },

	// 新建工资审批流
	Salary_PayrollWageApprovalProcess: async (params) => {
		return await request({
			url: '/SalaryManagement/Salary_Payroll/WageApprovalProcess',
			data: params,
			method: 'post'
		})
	},
	// 鑫建工资名册审批流
	Salary_Employee_RosterWageApprovalProcess: async (params) => {
		return await request({
			url: '/SalaryManagement/Salary_Employee_Roster/WageApprovalProcess',
			data: params,
			method: 'post'
		})
	},

	// 获取工资审批流详情
	Salary_ApprovalFormGetTheData: async (params) => {
		return await request({
			url: '/SalaryManagement/Salary_ApprovalForm/GetTheData',
			data: params,
			method: 'post'
		})
	},
	// 获取工资名册审批流详情
	SalaryRoster_ApprovalFormGetTheData: async (params) => {
		return await request({
			url: '/SalaryManagement/SalaryRoster_ApprovalForm/GetTheData',
			data: params,
			method: 'post'
		})
	},
	// 日常审批撤回
	Ai_WorkitemDailyApprovedCanceled: async (params) => {
		return await request({
			url: `/FlowManagement/Ai_Workitem/DailyApproved?id=${params.ApprovalFormId}&flag=false&status=Canceled`,
			data: {},
			method: 'post'
		})
	},
	// 差旅审批撤回
	Ai_WorkitemTravelApprovedCanceled: async (params) => {
		return await request({
			url: `/FlowManagement/Ai_Workitem/TravelApproved?id=${params.ApprovalFormId}&flag=false&status=Canceled`,
			data: {},
			method: 'post'
		})
	},

	// 日常审批提交
	Ai_WorkitemDailyApproved: async (params) => {
		return await request({
			url: `/FlowManagement/Ai_Workitem/DailyApproved?id=${params.Id}&comment=${params.comment}&flag=${params.flag}`,
			data: {},
			method: 'post'
		})
	},
	// 差旅审批提交
	Ai_WorkitemTravelApproved: async (params) => {
		return await request({
			url: `/FlowManagement/Ai_Workitem/TravelApproved?id=${params.Id}&comment=${params.comment}&flag=${params.flag}`,
			data: {},
			method: 'post'
		})
	},
	// 工资名册审批流提交
	Ai_WorkitemSalaryRosterApproved: async (params) => {
		return await request({
			url: `/FlowManagement/Ai_Workitem/SalaryRosterApproved?id=${params.id}&comment=${params.comment}&flag=${params.flag}`,
			data: {},
			method: 'post'
		})
	},
	// 工资审批提交
	Ai_WorkitemSalaryApproved: async (params) => {
		return await request({
			url: `/FlowManagement/Ai_Workitem/SalaryApproved?id=${params.id}&comment=${params.comment}&flag=${params.flag}`,
			data: {},
			method: 'post'
		})
	},
	// 工资审批流撤回
	Ai_WorkitemSalaryApprovedCanceled: async (params) => {
		return await request({
			url: `/FlowManagement/Ai_Workitem/SalaryApproved?id=${params.id}&status=Canceled&flag=false`,
			data: {},
			method: 'post'
		})
	},
	// 工资名额审批流撤回
	Ai_WorkitemSalaryRosterApprovedCanceled: async (params) => {
		return await request({
			url: `/FlowManagement/Ai_Workitem/SalaryRosterApproved?id=${params.id}&status=Canceled&flag=false`,
			data: {},
			method: 'post'
		})
	},
	// 日常保存修改 临时保存草稿
	Reimburse_Daily_MainSaveData: async (params) => {
		return await request({
			url: '/ReimburseManagement/Reimburse_Daily_Main/SaveData',
			data: params,
			method: 'post'
		})
	},
	// 差旅保存修改 临时保存草稿
	Reimburse_Travel_Business_MainSaveData: async (params) => {
		return await request({
			url: '/ReimburseManagement/Reimburse_Travel_Business_Main/SaveData',
			data: params,
			method: 'post'
		})
	},

	// 我的待办列表删除
	Ai_WorkitemDeleteData: async (params) => {
		return await request({
			url: '/FlowManagement/Ai_Workitem/DeleteData',
			data: params,
			method: 'post'
		})
	},

	// 获取日常报销单主表详情
	Reimburse_Daily_MainGetTheData: async (params) => {
		return await request({
			url: '/ReimburseManagement/Reimburse_Daily_Main/GetTheData',
			data: params,
			method: 'post'
		})
	},
	// 获取差旅报销单主表详情
	Reimburse_Travel_Business_MainGetTheData: async (params) => {
		return await request({
			url: '/ReimburseManagement/Reimburse_Travel_Business_Main/GetTheData',
			data: params,
			method: 'post'
		})
	},





	// 获取每一个用户下的报表文件目录
	GetReportFileDirectoryInfo: async (params) => {
		return await request({
			url: '/Base_Manage/Home/GetReportFileDirectoryInfo?folderPath=' + params.curNameKey,
			data: {},
			method: 'post'
		})
	},
	// 获取报表文件目录的列表
	GetReportFileInfosList: async (params) => {
		return await request({
			url: '/Base_Manage/Home/GetReportFileInfos?folderPath=' + params.curNameKey,
			data: {},
			method: 'post'
		})
	},

	// 获取报表列表
	ByMoreConditionOfAssign: async (params) => {
		return await request({
			url: '/Wyn_ReportManage/Wyn_ReportInfo/GetDataListByMoreConditionOfAssign',
			data: params,
			method: 'post'
		})
	},
	// 获取交易订单列表数据
	GetDataListByMySelfCustomer: async (params) => {
		return await request({
			url: '/OrderManagement/SO_SOMain/GetDataListByMySelfCustomer',
			data: params,
			method: 'post'
		})
	},

	// 获取样品反馈列表
	GetDataListByMySelfAndMoreCondition: async (params) => {
		return await request({
			url: '/SampleManagement/SPL_SampleApplyMain/GetDataListByMySelfAndMoreCondition',
			data: params,
			method: 'post'
		})
	},
	// 样品反馈列表删除
	DeleteDataOfAll: async (params) => {
		return await request({
			url: '/SampleManagement/SPL_SampleApplyMain/DeleteDataOfAll',
			data: params,
			method: 'post'
		})
	},
	// 获取我的工单列表
	GetDataListByMoreCondition: async (params) => {
		return await request({
			url: '/SWOManagement/ServiceWorkOrderMain/GetDataListByMoreCondition',
			data: params,
			method: 'post'
		})
	},

	// 获取我的工单-我的发起列表
	ServiceWorkOrderMainGetDataListByMySelfCustomer: async (params) => {
		return await request({
			url: '/SWOManagement/ServiceWorkOrderMain/GetDataListByMySelfCustomer',
			data: params,
			method: 'post'
		})
	},
	// 获取我的工单我的代办列表
	ServiceWorkOrderMainGetDataListByMyToDo: async (params) => {
		return await request({
			url: '/SWOManagement/ServiceWorkOrderMain/GetDataListByMyToDo',
			data: params,
			method: 'post'
		})
	},
	// 我的工单列表删除
	ServiceWorkOrderMainDeleteData: async (params) => {
		return await request({
			url: '/SWOManagement/ServiceWorkOrderMain/DeleteData',
			data: params,
			method: 'post'
		})
	},

	// 获取工单类型下拉数据
	Base_DictionaryMainGetTheDataByDicKey: async (params) => {
		return await request({
			url: '/Base_BasicData/Base_DictionaryMain/GetTheDataByDicKey',
			data: params,
			method: 'post'
		})
	},

	// 新建工单提交
	ServiceWorkOrderMainSaveData: async (params) => {
		return await request({
			url: '/SWOManagement/ServiceWorkOrderMain/SaveData',
			data: params,
			method: 'post'
		})
	},
	// 编辑工单提交

	ServiceWorkOrderMainUpdateData: async (params) => {
		return await request({
			url: '/SWOManagement/ServiceWorkOrderMain/UpdateData',
			data: params,
			method: 'post'
		})
	},


	// 获取沟通记录列表
	GetCust_CommunicationList: async (params) => {
		return await request({
			url: '/CustomerManagement/SalesmanDailyRecord/GetDataListByMySelfAndMoreCondition',
			data: params,
			method: 'post'
		})
	},

	// 抄送列表
	SalesmanDailyRecordUpdateDataByCondition: async (params) => {
		return await request({
			url: '/CustomerManagement/SalesmanDailyRecord/UpdateDataByCondition',
			data: params,
			method: 'post'
		})
	},


	// 获取联系人列表
	GetDataListOfMySelfCustomerInfoByConditions: async (params) => {
		return await request({
			url: '/CustomerManagement/Cust_CustomerLinkMan/GetDataListOfMySelfCustomerInfoByConditions',
			data: params,
			method: 'post'
		})
	},

	// 新增联系人
	Cust_CustomerLinkManSaveData: async (params) => {
		return await request({
			url: '/CustomerManagement/Cust_CustomerLinkMan/SaveData',
			data: params,
			method: 'post'
		})
	},
	// 获取联系人详情
	Cust_CustomerLinkManGetTheData: async (params) => {
		return await request({
			url: '/CustomerManagement/Cust_CustomerLinkMan/GetTheData',
			data: params,
			method: 'post'
		})
	},

	// 修改联系人
	Cust_CustomerLinkManUpdateData: async (params) => {
		return await request({
			url: '/CustomerManagement/Cust_CustomerLinkMan/UpdateData',
			data: params,
			method: 'post'
		})
	},

	// 删除联系人
	Cust_CustomerLinkManDeleteData: async (params) => {
		return await request({
			url: '/CustomerManagement/Cust_CustomerLinkMan/DeleteData',
			data: params,
			method: 'post'
		})
	},
	// 获取客户列表数据
	CustomerInfoGetUionDataList: async (params) => {
		return await request({
			// 用于报销专用选择客户
			url: '/CustomerManagement/CustomerInfo/GetUionDataList',
			// url: '/CustomerManagement/CustomerInfo/GetDataListForCustomerInfoRetrieval',
			data: params,
			method: 'post'
		})
	},

	// 取消沟通记录的关联
	SalesmanDailyRecordDisassociateData: async (params) => {
		return await request({
			// 用于报销专用选择客户
			url: '/CustomerManagement/SalesmanDailyRecord/DisassociateData',
			data: params,
			method: 'post'
		})
	},
	// 获取省份信息
	GetDataListByPIdListProvince: async (params) => {
		return await request({
			url: '/Base_BasicData/Base_District/GetDataListByPId?pId=0',
			data: params,
			method: 'post'
		})
	},

	// 获取市级信息
	GetDataListByPIdListcCity: async (params) => {
		return await request({
			url: '/Base_BasicData/Base_District/GetDataListByPId?pId=' + params.Id,
			data: {},
			method: 'post'
		})
	},

	// 获取区级信息

	GetDataListByPIdListcCounty: async (params) => {
		return await request({
			url: '/Base_BasicData/Base_District/GetDataListByPId?pId=' + params.Id,
			data: {},
			method: 'post'
		})
	},

	// 客户备案获取所属公司
	Base_u8databaseGetbase_u8databaseDataList: async (params) => {
		return await request({
			url: '/Base_Manage/base_u8database/Getbase_u8databaseDataList',
			data: {},
			method: 'post'
		})
	},
	// 备案提交
	CustomerInfoSaveData: async (params) => {
		return await request({
			url: '/CustomerManagement/CustomerInfo/SaveData',
			data: params,
			method: 'post'
		})
	},

	//备案提交
	Cust_CustomerApplySaveData: async (params) => {
		return await request({
			url: '/CustomerManagement/Cust_CustomerApply/SaveData',
			data: params,
			method: 'post'
		})
	},

	// 客户备案详情
	Cust_CustomerLinkManGetDataListByConditions: async (params) => {
		return await request({
			url: '/CustomerManagement/Cust_CustomerLinkMan/GetDataListByConditions',
			data: params,
			method: 'post'
		})
	},
	//下拉数据
	GetTheDataByDicKey: async (params) => {
		return await request({
			url: '/Base_BasicData/Base_DictionaryMain/GetTheDataByDicKey',
			data: params,
			method: 'post'
		})
	},

	// 获取交易--订单信息详情数据
	SO_SOMainGetTheData: async (params) => {
		return await request({
			url: '/OrderManagement/SO_SOMain/GetTheData',
			data: params,
			method: 'post'
		})
	},
	// 获取交易详情--订单信息列表数据
	SO_SODetailsGetDataList: async (params) => {
		return await request({
			url: '/OrderManagement/SO_SODetails/GetDataListByMoreCondition',
			data: params,
			method: 'post'
		})
	},
	// 获取发货信息列表数据
	SO_SOMainGetSa_SaleOrderAscendDis: async (params) => {
		return await request({
			url: '/OrderManagement/SO_SOMain/GetSa_SaleOrderAscendDis',
			data: params,
			method: 'post'
		})
	},
	// 获取出库信息列表数据
	SO_SOMainGetSa_SaleOrderAscendOut: async (params) => {
		return await request({
			url: '/OrderManagement/SO_SOMain/GetSa_SaleOrderAscendOut',
			data: params,
			method: 'post'
		})
	},
	// 获取发票信息列表
	SO_SOMainGetSa_SaleOrderAscendBill: async (params) => {
		return await request({
			url: '/OrderManagement/SO_SOMain/GetSa_SaleOrderAscendBill',
			data: params,
			method: 'post'
		})
	},
	// 获取收款信息列表数据
	SO_SOMainGetSA_ProcessGathering: async (params) => {
		return await request({
			url: '/OrderManagement/SO_SOMain/GetSA_ProcessGathering',
			data: params,
			method: 'post'
		})
	},

	// 获取收件人列表
	Cust_AddressBookGetDataListByMoreCondition: async (params) => {
		return await request({
			url: '/CustomerManagement/Cust_AddressBook/GetDataListByMoreCondition',
			data: params,
			method: 'post'
		})
	},

	// 获取客户备案上级单位详情
	CustomerInfoGetTheData: async (params) => {
		return await request({
			url: '/CustomerManagement/CustomerInfo/GetTheData',
			data: params,
			method: 'post'
		})
	},
	// 添加收件人保存

	Cust_AddressBookSaveData: async (params) => {
		return await request({
			url: '/CustomerManagement/Cust_AddressBook/SaveData',
			data: params,
			method: 'post'
		})
	},

	// 获取产品列表数据
	ProductManagementInventoryGetDataList: async (params) => {
		return await request({
			url: '/ProductManagement/Inventory/GetDataList',
			data: params,
			method: 'post'
		})
	},

	// 获取经办人列表数据
	Base_ManageBase_UserGetDataList: async (params) => {
		return await request({
			url: '/Base_Manage/Base_User/GetDataList',
			data: params,
			method: 'post'
		})
	},

	// 新建样品提交
	SPL_SampleApplyMainSaveData: async (params) => {
		return await request({
			url: '/SampleManagement/SPL_SampleApplyMain/SaveData',
			data: params,
			method: 'post'
		})
	},

	// 修改样品子表删除
	SPL_SampleApplyDetailsDeleteData: async (params) => {
		return await request({
			url: '/SampleManagement/SPL_SampleApplyDetails/DeleteData',
			data: params,
			method: 'post'
		})
	},

	// 样品反馈提交
	SPL_SampleApplyMainUpdateDataByCondition: async (params) => {
		return await request({
			url: '/SampleManagement/SPL_SampleApplyMain/UpdateDataByCondition',
			data: params,
			method: 'post'
		})
	},
	// 修改样品获取商品详情
	SPL_SampleApplyMainGetTheDataOfAll: async (params) => {
		return await request({
			url: '/SampleManagement/SPL_SampleApplyMain/GetTheDataOfAll',
			data: params,
			method: 'post'
		})
	},

	// 获取沟通记录详情
	SalesmanDailyRecordGetTheData: async (params) => {
		return await request({
			url: '/CustomerManagement/SalesmanDailyRecord/GetTheData',
			data: params,
			method: 'post'
		})
	},

	// 沟通记录保存提交
	SalesmanDailyRecordSaveData: async (params) => {
		return await request({
			url: '/CustomerManagement/SalesmanDailyRecord/SaveData',
			data: params,
			method: 'post'
		})
	},

	// 获取我的工单详情
	ServiceWorkOrderMainGetTheDataForDetail: async (params) => {
		return await request({
			url: '/SWOManagement/ServiceWorkOrderMain/GetTheDataForDetail',
			data: params,
			method: 'post'
		})
	},

	// 工单回复提交
	ServiceWorkOrderDetailSaveData: async (params) => {
		return await request({
			url: '/SWOManagement/ServiceWorkOrderDetail/SaveData',
			data: params,
			method: 'post'
		})
	},

	// 修改登录密码
	Base_ManageHomeChangePwd: async (params) => {
		return await request({
			url: '/Base_Manage/Home/ChangePwd',
			data: params,
			method: 'post'
		})
	},

	// 判断姓名是否存在人员档案中
	Base_UserGetExistEmployee: async (params) => {
		return await request({
			url: '/Base_Manage/Base_User/GetExistEmployee?staffName=' + params.staffName,
			data: {},
			method: 'post'
		})
	},

	// 客户关联沟通记录列表数据
	SalesmanDailyRecordGetDataListReimburse: async (params) => {
		return await request({
			url: '/CustomerManagement/SalesmanDailyRecord/GetDataListReimburse',
			data: params,
			method: 'post'
		})
	},

	// 个人权限列表
	Base_UserGetUserMenuPermissions: async (params) => {
		return await request({
			url: '/Base_Manage/Base_User/GetUserMenuPermissions?userId=' + params.userId,
			data: {},
			method: 'post'
		})
	},

	// app版本自动升级
	apk_editionGetApkEdtionData: async (params) => {
		return await request({
			url: '/Base_Manage/apk_edition/GetApkEdtionData?AppType=' + params.AppType,
			data: {},
			method: 'post'
		})
	},

	// 获取第三方我的报表系统查看的参数
	Wyn_TokenManagerGetDataList: async (params) => {
		return await request({
			url: '/Wyn_ReportManage/Wyn_TokenManager/GetDataList',
			data: params,
			method: 'post'
		})
	},
	// 保存头像
	Base_UserUpdateDataByConditions: async (params) => {
		return await request({
			url: '/Base_Manage/Base_User/UpdateDataByConditions',
			data: params,
			method: 'post'
		})
	},
}